Skip to content

gh-145244: Fix use-after-free on borrowed dict key in json encoder - #145245

Merged
gpshead merged 3 commits into
python:mainfrom
raminfp:fix-gh-145244-json-uaf-key
Apr 11, 2026
Merged

gh-145244: Fix use-after-free on borrowed dict key in json encoder#145245
gpshead merged 3 commits into
python:mainfrom
raminfp:fix-gh-145244-json-uaf-key

Conversation

@raminfp

@raminfp raminfp commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Fix use-after-free in encoder_encode_key_value() where borrowed references to dict keys from PyDict_Next() can become dangling pointers if the default callback mutates the dictionary during encoding.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants